<template>
	<view class='my-account'>
		<view class='wrapper'>
			<view class='header'>
				<view class='headerCon'>
					<view class='account flex-between'>
						<view class='assets' style="flex: 1;">
							<view>总资产(元)</view>
							<view class='money'>{{userInfo.now_money || 0.00}}</view>
						</view>
						<view @click="$u.throttle(toPaymentPage, 500)" class='recharge' style="margin-right: 35rpx;">充值</view>
						<view @click="$u.throttle(toWithdrawPage, 500)" class='recharge'>提现</view>

					</view>
					<view class='cumulative flex row-top'>
						<view class='item'>
							<view>加油币</view>
							<view class='money'>{{userInfo.orderStatusSum || 0.00}}</view>
						</view>
						<view class='item'>
							<view>累计消费(元)</view>
							<view class='money'>{{userInfo.orderStatusSum || 0.00}}</view>
						</view>
					</view>

				</view>
			</view>
			<view class='nav flex flex-center'>
				<navigator class='item' hover-class='none' url='/pages/users/user_bill/index'>
					<view class='custom-icon custom-icon-wodezhangdan iconfont'></view>
					<view>账单记录</view>
				</navigator>
			<!-- 	<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=1'>
					<view class='iconfont custom-icon custom-icon-xiaofeijilu'></view>
					<view>消费记录</view>
				</navigator>
				<navigator class='item' hover-class='none' url='/pages/users/user_bill/index?type=2'>
					<view class='iconfont  custom-icon custom-icon-chongzhi'></view>
					<view>充值记录</view>
				</navigator> -->
				<navigator class='item' hover-class='none' url='/pages/users/cashback-record/index'>
						<view class='iconfont custom-icon custom-icon-chongzhi'></view>
						<view>返现记录</view>
					</navigator>
				<navigator class='item' hover-class='none' url='/pages/users/retrieval-record/index'>
						<view class='iconfont custom-icon custom-icon-xiaofeijilu'></view>
						<view>提现记录</view>
					</navigator>
					

			</view>
			<view class='advert '>

				<view class='item' @click="route({
					type:'tab',
					url:'/pages/preferential/preferential' })">
					<view class="flex-center flex-between" style="height: 100%;">
						<view class='text'>
							<view class='name'>领取优惠券</view>
							<view>满减享优惠</view>
						</view>
						<view class='pictrue'>
							<image src='../static/images/money.png'></image>
						</view>
					</view>
				</view>
			</view>

		</view>
		<view class="recommend mt10" style="background-color: #fff;padding: 20rpx 0;">
			<view class="w94">
				<view style="text-align: center;" class="flex-center">

					<text class="name" style="color: #282828;font-size: 32rpx;font-weight: 600;">推荐油站</text>

				</view>
				<view v-for="item of 5">
					<GasStaionItem />
					<u-divider></u-divider>
				</view>
			</view>
		</view>

	</view>


</template>

<script setup>
	import GasStaionItem from "@/pages/gas_station_mall/components/gas_station_item/index.vue"
	import {
		ref
	} from 'vue';
	import {
		toLogin
	} from '@/utils/login.js';
	import {
		route
	} from "@/uni_modules/uview-plus";
	const userInfo = ref({});
	const hostProduct = ref([])

// 充值
	const toPaymentPage = () => {
		uni.navigateTo({
			url: '/pages/users/user_payment/index'
		})
	}
	// 提现
	const toWithdrawPage = () => {
		uni.navigateTo({
			url: '/pages/users/user_withdraw/index'
		})
	}
</script>

<style scoped lang="scss">
	.my-account .wrapper {
		background-color: #fff;
		padding: 32rpx 0 34rpx 0;
		margin-bottom: 14rpx;
	}

	.my-account .wrapper .header {
		width: 690rpx;
		height: 330rpx;

		background: $u-primary;
		border-radius: 16rpx;
		margin: 0 auto;
		box-sizing: border-box;
		color: rgba(255, 255, 255, 0.6);
		font-size: 24rpx;
	}

	.my-account .wrapper .header .headerCon {
		background-image: url('');
		background-repeat: no-repeat;
		background-size: 100%;
		height: 100%;
		width: 100%;
		padding: 36rpx 0 29rpx 0;
		box-sizing: border-box;
	}

	.my-account .wrapper .header .headerCon .account {
		padding: 0 35rpx;
	}

	.my-account .wrapper .header .headerCon .account .assets .money {
		font-size: 72rpx;
		color: #fff;
		margin-top: 6rpx;
		font-family: 'Guildford Pro';
	}

	.my-account .wrapper .header .headerCon .account .recharge {
		font-size: 28rpx;
		width: 150rpx;
		height: 54rpx;
		border-radius: 27rpx;
		background-color: #fff9f8;
		text-align: center;
		line-height: 54rpx;
		color: $u-primary;
	}

	.my-account .wrapper .header .headerCon .cumulative {
		margin-top: 46rpx;
	}

	.my-account .wrapper .header .headerCon .cumulative .item {
		flex: 1;
		padding-left: 35rpx;
	}

	.my-account .wrapper .header .headerCon .cumulative .item .money {
		font-size: 48rpx;
		font-family: 'Guildford Pro';
		color: #fff;
		margin-top: 6rpx;
	}

	.my-account .wrapper .nav {
		height: 155rpx;
		border-bottom: 1rpx solid #f5f5f5;
	}

	.my-account .wrapper .nav .item {
		flex: 1;
		text-align: center;
		font-size: 26rpx;
		color: #999;
	}

	.my-account .wrapper .nav .item .iconfont {
		font-size: 44rpx;
		margin: 0 auto;
		margin-bottom: 14rpx;
		color: $u-primary;
	}

	.my-account .wrapper .advert {
		padding: 0 30rpx;
		margin-top: 30rpx;
	}

	.my-account .wrapper .advert .item {
		background-color: #fff6d1;
		width: 100%;
		height: 118rpx;
		border-radius: 10rpx;
		padding: 0 27rpx 0 25rpx;
		box-sizing: border-box;
		font-size: 24rpx;
		color: #e44609;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1),
	}


	.my-account .wrapper .advert .item .pictrue {
		width: 78rpx;
		height: 78rpx;
	}

	.my-account .wrapper .advert .item .pictrue image {
		width: 100%;
		height: 100%;
	}

	.my-account .wrapper .advert .item .text .name {
		font-size: 30rpx;
		font-weight: bold;
		color: #f33c2b;
		margin-bottom: 7rpx;
	}

	.my-account .wrapper .advert .item.on .text .name {
		color: #f64051;
	}

	:deep(.u-divider) {
		margin: 0px !important;
	}
</style>